package demo2;

public class Test731 {
    public static void main(String [] args){
        Computer computer1=new Computer();
        computer1.open();
        computer1.useUsb(new KeyBoard());//向上转型
        computer1.useUsb(new Mouse());
        computer1.close();
    }
}
abstract class B implements USB{
    //抽象类实现接口不需要重写其抽象方法
}